package com.hb.common.dto;

import java.util.Objects;

public class Database {

    /**
     * 唯一id，用来区分数据库
     */
    private Integer id;

    /**
     * 连接名称
     */
    private String connectName;

    /**
     * 数据库类型
     */
    private String dbType;

    /**
     * 数据库主机地址
     */
    private String host;

    /**
     * 端口号
     */
    private String port;

    /**
     * 数据库名称
     */
    private String dbName;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 最大文件数量
     */
    private Integer maxFileNum;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Database that = (Database) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDbType() {
        return dbType;
    }

    public void setDbType(String dbType) {
        this.dbType = dbType;
    }

    public String getConnectName() {
        return connectName;
    }

    public void setConnectName(String connectName) {
        this.connectName = connectName;
    }

    public String getDbName() {
        return dbName;
    }

    public void setDbName(String dbName) {
        this.dbName = dbName;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getMaxFileNum() {
        return maxFileNum;
    }

    public void setMaxFileNum(Integer maxFileNum) {
        this.maxFileNum = maxFileNum;
    }
}
